<?php

// ----------------------- 用户管理  ---------------------------

// 用户登录 
Route::post("/user/token","home\UserController@token");
Route::post("/admin/adduser","admin\UserController@adduser");

// 创建管理员用户
Route::post("/admin/login","admin\UserController@login");
// 管理员用户列表
Route::get("/admin/users","admin\UserController@users");
// 获取单个管理员
Route::get("/admin/user/{id}","admin\UserController@user");
// 更新用户信息
Route::post("/admin/edit","admin\UserController@edit");
// 更新用户状态
Route::post("/admin/update","admin\UserController@update");
// 删除用户
Route::post("/admin/del/{id}","admin\UserController@del");
// 获取菜单
Route::get("/menus","admin\MenuController@menus");

// 重置密码
Route::post("/admin/reset_password","admin\UserController@reset_password");
// 头像上传
Route::post("/admin/set_usericon","admin\UserController@set_usericon");


// ---------------------- 消息管理 --------------------------

Route::post("/msg/create","home\MsgController@create"); // vue用户发布问题


// ----------------------- 房源管理  ---------------------------

// 关注房源
Route::post("/admin/like","admin\UserController@like"); 
// 取消关注          
Route::post("/admin/unlike","admin\UserController@unlike");    
//我的关注
Route::post("/admin/my_likes","admin\UserController@my_likes");   


// 发布房源
Route::post("/house/create","admin\HouseController@create");
Route::post("/house/add","admin\HouseController@add");

Route::post("/house/save_edit","admin\HouseController@save_edit");

// 删除图片
Route::post("/house/del_img","admin\HouseController@del_img");

Route::post("/msg/answer","home\MsgController@msg_answer");      // 管理员回复消息
Route::get("/msg_list","home\MsgController@msg_list"); // 管理员获取所有用户的消息

